import request from '@/utils/request'

//微信小程序的一键登录
export const wmaLogin = (params: any) => {
    return request({
        url: '/app-api/member/auth/weixin-mini-app-login',
        method: 'POST',
        body: params,
        hideLoading: false,
    })
}
//校验手机验证码
export const validateSmsCode = (params: any) => {
    return request({
        url: '/app-api/member/auth/validate-sms-code',
        method: 'POST',
        body: params,
        hideLoading: false,
    })
}
//发送手机验证码
export const sendSmsCode = (params: any) => {
    return request({
        url: '/app-api/member/auth/send-sms-code',
        method: 'POST',
        body: params,
        hideLoading: false,
    })
}
//校验手机验证码
export const smsLogin = (params: any) => {
    return request({
        url: '/app-api/member/auth/sms-login',
        method: 'POST',
        body: params,
        hideLoading: false,
    })
}
//校验用户是否是新用户
export const userIsNew = (params: any) => {
    return request({
        url: `/app-api/member/user/validate/user/isNew/${params}`,
        method: 'GET',
        hideLoading: false,
    })
}
//获得基本信息
export const userGet = () => {
    return request({
        url: `/app-api/member/user/get`,
        method: 'GET',
        hideLoading: false,
    })
}
//登出系统
export const authLogout = () => {
    return request({
        url: '/app-api/member/auth/logout',
        method: 'POST',
        hideLoading: false,
    })
}
//注销登录
export const authLogOff = (params: any) => {
    return request({
        url: '/app-api/member/auth/logoff',
        method: 'POST',
				body: params,
        hideLoading: false,
    })
}

//绑定openid
export const socialbind = () => {
    return request({
        url: '/app-api/system/social-user/bind',
        method: 'POST',
        hideLoading: false,
    })
}
